<html lang="en" ng-app="app">
<head>
    <meta charset="utf-8">
    <meta name="description" content="why520crazy">
    <meta name="author" content="why520crazy">

    <title>w5cValidator - Angular js </title>
    <link href="css/css.css" rel="stylesheet">
    <link href="lib/highlight/8.0/styles/default.css" rel="stylesheet">

</head>

<body>
<!--<div class="container">-->
<div class="wrap">
    <div class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">w5c-Validator</a>
            </div>
            <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a href="https://github.com/why520crazy/w5c-validator-angular">github 源代码</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="container" data-ng-controller="validateCtrl" ng-cloak="">
        <div class="row">
            <div class="col-md-5">
                <tabset>
                    <tab heading="示例">
                        <ng-include src="'validate.form.html'"></ng-include>
                        <div class="row">
                            <div class="col-md-2"></div>
                            <div class="col-md-10">
                                <div class="checkbox">
                                    <label>
                                        <input ng-model="vm.validateOptions.blurTrig" type="checkbox"> 光标移走触发验证
                                    </label>
                                </div>
                                <div class="checkbox">
                                    <label>
                                        <input ng-model="vm.showDynamicElement" type="checkbox"> 是否现实动态元素
                                    </label>
                                </div>
                                <select class="form-control" ng-model="vm.showErrorType" ng-change="vm.changeShowType()">
                                    <option value="1">每个输入框显示错误信息</option>
                                    <option value="2">错误信息集中显示</option>
                                </select>
                            </div>
                        </div>
                    </tab>
                    <tab heading="使用说明">
                        <div class="use-info">
                            <ol>
                                <li>
                                    HTML 中引用 dist/w5cValidator.js；
                                </li>
                                <li>
                                    启动module引用 "w5c.validator"，如:<code> var app = angular.module("app", ["w5c.validator"]);</code>
                                </li>
                                <li>
                                    在<code>app.config</code>事件中配置全局属性和显示规则；
                                </li>
                            </ol>
                            <table class="table-bordered">
                                <thead><tr>
                                    <th>名称</th>
                                    <th>默认值</th>
                                    <th>作用</th>
                                </tr></thead>
                                <tbody>
                                <tr>
                                    <td>blurTrig</td>
                                    <td>false</td>
                                    <td>光标移除元素后是否验证并显示错误提示信息</td>
                                </tr>
                                <tr>
                                    <td>showError</td>
                                    <td>true</td>
                                    <td>可以是bool和function，每个元素验证不通过后调用该方法显示错误信息，默认true，显示错误信息在元素的后面。</td>
                                </tr>
                                <tr>
                                    <td>removeError</td>
                                    <td>true</td>
                                    <td>可以是bool和function，每个元素验证通过后调用该方法移除错误信息，默认true，验证通过后在元素的后面移除错误信息。</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

                    </tab>
                </tabset>


            </div>
            <div class="col-md-7">

                <tabset>
                    <tab heading="HTML">
                        <div hljs source="vm.htmlSource" language="html"></div>
                    </tab>
                    <tab heading="js">
                        <div hljs source="vm.jsSource" language="js"></div>
                    </tab>
                    <tab heading="less">
                        <div hljs source="vm.lessSource" language="css"></div>
                    </tab>
                </tabset>
            </div>
        </div>
    </div>
</div>

<div id="footer">
    <div class="container">

        <div class="pull-left">
            <p class="text-muted credit">
                <span>版权所有 © 2013 why520crazy</span></p></div>
        <div class="pull-right text-muted credit">
            <a target="_blank" href="http://weibo.com/why520crazy">新浪微博 @why520crazy</a> |
            <a target="_blank" href="http://why520crazy.cnblogs.com/">博客园博客</a> |
            <a target="_blank" href="https://worktile.com">Worktile</a>
        </div>

    </div>
</div>
<!--</div>-->

<!--<script src="lib/jquery/1.11.0/jquery.js"></script>-->
<script src="lib/angular/1.4.8/angular.js"></script>
<script src="lib/angular-ui/ui-bootstrap/0.9.0/ui-bootstrap-tpls.js"></script>
<script src="lib/highlight/8.0/highlight.pack.js"></script>
<script src="lib/angular-highlightjs/angular-highlightjs.js"></script>
<script src="../src/w5cValidator.js"></script>
<script src="../src/directive.js"></script>
<script src="index.js"></script>
</body>
</html>